fsck: Fix crash on repositories with < 10 objects
authorColin Walters <walters@verbum.org>
Thu, 25 Jul 2013 16:06:21 +0000 (12:06 -0400)
committerColin Walters <walters@verbum.org>
Thu, 25 Jul 2013 16:06:21 +0000 (12:06 -0400)
src/ostree/ot-builtin-fsck.c

index e0b64990449d6fcda566440e9dfeb1c55baec83a..420921b77ddd8f014bfb830b7cb0227a09b1597b 100644 (file)
@@ -223,7 +223,7 @@ fsck_reachable_objects_from_commits (OstreeRepo            *repo,
                                      cancellable, error))
         goto out;
 
-      if (i % mod == 0)
+      if (mod == 0 || (i % mod == 0))
         g_print ("%u/%u objects\n", i, count);
       i++;
     }